import request from '@/utils/request'
// 加入社团-社团分类
export function ClubClassify(data) {
	return request({
		'url': '/activity/ActivityAssociationInfo/classify',
		'method': 'get',
		data
	})
}

// 加入社团-社团数据
export function GetClassify() {
	return request({
		'url': '/activity/activityType/classify',
		'method': 'get'
	})
}

// 加入社团-搜索
export function SearchClub(data) {
	return request({
		'url': '/activity/ActivityAssociationInfo/search',
		'method': 'get',
		data
	})
}

// 社团首页-我的社团
export function myClub(userId) {
	return request({
		'url': '/activity/members/list1?user_id=' + userId,
		'method': 'get'
	})
}

// 社团首页-社团广场
export function clubSquare(data) {
	return request({
		'url': `/activity/ActivityAssociationInfo/square?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
		'method': 'get'
	})
}
// 社团推荐
export function clubRecommend() {
	return request({
		'url': '/activity/ActivityAssociationInfo/sell',
		'method': 'get'
	})
}

// 社团信息
export function ClubInfo(data) {
	return request({
		'url': '/activity/ActivityAssociationInfo/info',
		'method': 'get',
		params:data
	})
}
//社团公告列表
export function clubNotice(data) {
	return request({
		url: '/activity/activityMessage/notice',
		method: 'get',
		data: data,
	})
}


//发布社团公告
export function addClubMsg(data) {
	return request({
		url: '/activity/activityMessage/addmessage',
		method: 'post',
		data: data,
	})
}

//社团公告进行置顶
export function clubNoticeTop(data) {
	return request({
		url: `/activity/activityMessage/alter?id=${data.id}&reserveTwo=${data.reserveTwo}&associationId=${data.associationId}&userId=${data.userId}`,
		method: 'put',
	})
}

//删除社团公告
export function delClubNotice(data) {
	return request({
		url: `/activity/activityMessage/removeMessage?associationId=${data.associationId}&id=${data.id}&userId=${data.userId}`,
		method: 'delete',
	})
}

//修改社团信息
export function changeClubInfo(data) {
	return request({
		url: '/activity/ActivityAssociationInfo/authenticationEdit',
		method: 'post',
		data: data,
	})
}



//社团成员获取
export function searchMember(data) {
	return request({
		url: `/activity/members/search`,
		method: 'get',
		data
	})
}
// 退出社团
export function quitClub(data){
	return request({
		url:'/activity/members/quitClub',
		method:'post',
		data
			})
}